const state = {
  ebomRefresh: false,
  orderfresh: false,
  structureRefresh: false,
  initInv: null
}

const getters = {
  getEbomRefresh(state) {
    return state.ebomRefresh
  },
  getOrderRefresh(state) {
    return state.orderfresh
  },
  getStructureRefresh(state) {
    return state.structureRefresh
  },
  getInitInv(state) {
    return state.initInv
  }
}

const mutations = {
  SET_EBOMREFRESH(state, ebomRefresh) {
    state.ebomRefresh = ebomRefresh
  },
  SET_ORDERREFRESH(state, orderfresh) {
    state.orderfresh = orderfresh
  },
  SET_STRUCTUREREFRESH(state, structureRefresh) {
    state.structureRefresh = structureRefresh
  },
  SET_INITINV(state, initInv) {
    state.initInv = initInv
  }
}

const actions = {
  setEbomRefresh({
    commit
  }, ebomRefresh) {
    commit("SET_EBOMREFRESH", ebomRefresh)
  },
  setOrderRefresh({
    commit
  }, orderRefresh) {
    commit("SET_ORDERREFRESH", orderRefresh)
  },
  setStructureRefresh({
    commit
  }, structureRefresh) {
    commit("SET_STRUCTUREREFRESH", structureRefresh)
  },
  setInitInv({
    commit
  }, initInv) {
    commit("SET_INITINV", initInv)
  }
}

export default {
  namespaced: true,
  state,
  mutations,
  actions,
  getters
}
